﻿using System.Diagnostics;
using System;
using Utils;

namespace StockModel
{
    [DebuggerDisplay("Name = {Name}, Stocks = {Items.Count}")]
    [Serializable]
    public class StockGroup
    {
        #region Properties

        public StockGroupName Name { get; set; }
        public ReadWriteLockedObservableCollection<StockGroupItem> Items { get; private set; }
        public ExchangeMarket Market { get; set; }

        #endregion

        #region Public Methods

        public StockGroup(StockGroupName name)
        {
			this.Items = new ReadWriteLockedObservableCollection<StockGroupItem>(Properties.Settings.Default.MaxWaitTimeStockGroupItemsWriteAccess);
            this.Name = name;
        }

        #endregion
    }
}
